

package jumavidesktop.Otros.Pojos;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author vimso
 */
public class consNamed {

    public consNamed() 
    {
    }
    
    public consNamed(String namedQuery) {
        this.namedQuery = namedQuery;
    }

    public consNamed(String namedQuery,Map<String,Object> parametros) {
        this.namedQuery = namedQuery;
        this.setParametros(parametros);
    }
    
    private String namedQuery;
    
    private Map<String, Object> parametros = new HashMap<String, Object>();

    public String getNamedQuery() {
        return namedQuery;
    }

    public void setNamedQuery(String namedQuery) {
        this.namedQuery = namedQuery;
    }

    public Map<String, Object> getParametros() {
        return parametros;
    }

    public void setParametros(Map<String, Object> parametros) {
        this.parametros = parametros;
    }    
    
    public void addParametros(String clave, Object valor)
    {
        this.parametros.put(clave, valor);
    }
    
    public void addParametrosLike(String clave, String valor){
        String nombre = "%"+valor+"%";
        this.parametros.put(clave,nombre);
    }
    
    public void removeParametros(String clave)
    {
        this.parametros.remove(clave);
    }
    
}
